<template>
  <div style="margin-bottom: 66px">
  <router-view/>
  <div id="nav">
    <router-link to="/" class="tar-bar-item">
      <div class="icon"><i class="iconfont icon-shouye"></i></div>
      <div>首页</div>
    </router-link>

    <router-link to="/category" class="tar-bar-item">
      <div class="icon"><i class="iconfont icon-leimupinleifenleileibie"></i></div>
      <div>分类</div>
    </router-link>

    <router-link to="/shopcart" class="tar-bar-item">
      <div class="icon"><i class="iconfont icon-gouwuche2"></i></div>
      <div>购物车</div>
    </router-link>

    <router-link to="/profile" class="tar-bar-item">
      <div class="icon"><i class="iconfont icon-wode"></i></div>
      <div>我的</div>
    </router-link>
  </div>
  </div>
</template>

<style>
@import "~@/assets/css/base.css";
@import "~@/assets/css/iconfont.css";
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: var(--color-text);
}

#nav {
  padding: 8px;
  background: #f6f6f6;
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 0 -3px 1px rgba(100, 100, 100, .1);
}
#nav .tar-bar-item {
  flex: 1;
  text-align: center;
  height: 50px;
  font-size: var(--font-size);
}
#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
#nav .tar-bar-item .icon {
  width: 24px;
  height: 24px;
  margin-top: 3px;
  vertical-align: middle;
  display: inline-block;
}
</style>
